package cn.gson.springboot.model.mapper.presalemapper;

import cn.gson.springboot.model.pjos.Details;
import cn.gson.springboot.model.pjos.Offer;
import cn.gson.springboot.model.pjos.OfferDetails;
import cn.gson.springboot.model.pjos.SpeedInfo;
import cn.gson.springboot.model.vo.privilegevo.ApprovalPosition;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 商机详情2mapper类
 */
@Repository
public interface PsBusinessDetailsTwoMapper {
    /*查询商机下的所有产品*/
    public List<Details> selectDetails(Integer businesId);

    /*查询报价单的当天最大的数字*/
    public String selectMaxOfferNnumber();

    /*查询商机下的报价单*/
    public List<Offer> selectBusinessOffer(Integer businesId);

    public Offer offerOne(Integer offerId);

    public List<OfferDetails> offerTwo(Integer offerId);

    /*查询所有的商机进度*/
    public List<SpeedInfo> allSpeed();

    /*根据进度内容查询出进度id*/
    public SpeedInfo selectOne(String speedContext);
   /* 统计商机下的跟进记录*/
    public Integer countFollowUp(Integer businesId);

    /*统计商机下的解决方案*/
    public Integer countProgramme(Integer businesId);

   /*统计商机下的报价单*/
   public Integer countOffer(Integer businesId);

   /**拥有审批权限的人*/
   public List<ApprovalPosition> findApprovaler(String meName);

}
